package com.cskaoyan.service;

import com.cskaoyan.bean.User;
import com.cskaoyan.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author stone
 * @date 2022/11/18 10:00
 */
@Service
public class UserServiceImpl implements UserService{

    @Autowired
    UserMapper userMapper;

    public UserServiceImpl() {
        System.out.println("UserService组件初始化");
    }

    @Override
    public User query(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }
}
